"""
给定数组nums与k，问nums是否存在2k的连续区间，
使得前一半与后一半均是严格升序的。枚举一下即可
"""

from typing import List

class Solution:
    def hasIncreasingSubarrays(self, nums: List[int], k: int) -> bool:
        n = len(nums)
        for i in range(n):
            if i + k + k > n: break
            if self.isOK(i, nums, k) and self.isOK(i + k, nums, k):
                return True
        return False
    
    def isOK(self, start, nums, k):
        for i in range(start + 1, start + k):
            if nums[i - 1] < nums[i]: pass
            else: return False
        return True